#ifndef IC_ACCEPTOR_H
#define IC_ACCEPTOR_H

#include <boost/shared_ptr.hpp>

#include "../event_handler.h"
#include "../thread_container.h"
#include "../multicaster.h"
#include "../configurator.h"
#include "../singletone.h"

#include "ic_handler.h"

namespace handler {
	class ic_acceptor : public network::event_handler {
	public:
		ic_acceptor(boost::shared_ptr<network::i_socket> ic,
			boost::shared_ptr<network::i_socket> web_sock,
			boost::shared_ptr<network::multicaster> mul)
		: _ic(ic), _web(web_sock), _multi(mul) 
		{}
		virtual ~ic_acceptor() {}
		virtual network::event_type get_type() const
		{
			return network::CONNECT;
		}
		virtual boost::shared_ptr<const network::i_socket>
			get_socket() const { return _web; }
		virtual void handle_event(
			boost::shared_ptr<network::event> n);
	private:
		boost::shared_ptr<network::i_socket> _ic;
		boost::shared_ptr<network::i_socket> _web;
		boost::shared_ptr<network::multicaster> _multi;
	};
}

#endif

